<template>
  <el-date-picker v-model="model" :type="option.type" :value-format="option.valueFormate || 'yyyy-MM-dd'" :clearable="option.clearable || true" :placeholder="option.placeholder || '选择日期'" :start-placeholder="option.startPlaceholder || '开始日期'" :end-placeholder="option.endPlaceholder || '结束日期'" :style="{ width: option.width }" />
</template>
<script>
export default {
  name: "iv-date-picker",
  props: {
    value: [String, Array],
    option: {
      type: Object,
      default: () => {}
    }
  },
  computed: {
    model: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("update:value", val);
      }
    }
  }
};
</script>
